projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
707373a
)
Handle case when mkshort has NO valid name.
author
robertl
<robertl>
Tue, 18 Jan 2005 19:15:32 +0000
(19:15 +0000)
committer
robertl
<robertl>
Tue, 18 Jan 2005 19:15:32 +0000
(19:15 +0000)
mkshort.c
patch
|
blob
|
history
diff --git
a/mkshort.c
b/mkshort.c
index 19ec3a51edb85b7441cc2406996b5a6a74b66c2e..5f40e18033cba6e3e9c88d8a78772c1fc09cbf57 100644
(file)
--- a/
mkshort.c
+++ b/
mkshort.c
@@
-386,6
+386,14
@@
mkshort(void *h, const char *istring)
strcpy(&ostring[hdl->target_len] - strlen(np), np);
}
+ /*
+ * If, after all that, we have an empty string, punt and
+ * let the must_uniq code handle it.
+ */
+ if (ostring[0] == '\0') {
+ ostring = xstrdup("WPT");
+ }
+
if (hdl->must_uniq) {
return mkshort_add_to_list(hdl, ostring);
}